package com.vae.content.feignclient;

import com.vae.po.CourseIndex;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: 35238
 * 功能: study-content-service模块 远程调用 study-search-api模块
 * 时间: 2024-06-07 22:09
 */
//下一行的value值要跟huanf-xue-search模块的bootstrap.yml文件的spring.application.name值一致
@FeignClient(value = "search-api", fallbackFactory = SearchServiceClientFallbackFactory.class)
@Service
public interface SearchServiceClient {

    //下一行的接口请求地址必须是wisdom-study-search模块已存在的接口请求地址
    @PostMapping("/search/index/course")
    Boolean add(@RequestBody CourseIndex courseIndex);
}